php remove parentheses and contents from string

104

php remove parentheses and contents from string -

$string = "ABC (Test1)";
echo preg_replace("/\([^)]+\)/","",$string); // 'ABC '

Comments

Submit
0 Comments